package com.example.JavaWebApi.core.commonmodel;

import lombok.Data;

/**
 * @PROJECT_NAME: JavaWebApi
 * @DESCRIPTION: 请求响应结果码
 * @Author: YangZe
 * @DATE: 2021/11/28 14:58
 */
public enum ResponseTypeEnum {
    Exception(-1,"出现异常！"),
    Success(2000,"获取数据成功！"),
    OperationSuccess(2001,"操作成功！"),
    OperationFailed(2002,"操作失败！"),
    NoToken(4011,"此接口禁止匿名访问！"),
    IllegalToken(4031,"非法令牌!"),
    OverdueToken(4032,"令牌超时！"),
    IllegalPermission(4033,"权限不足！"),
    FailLogin(-2,"登录失败！账号或密码不存在！"),
    UserExist(4033,"用户名已存在"),
    PwdInputError(4034,"旧密码输入有误"),
    PwdConfirmError(4035,"确认新密码输入有误"),
    ErrorParameter(5001,"传入参数有误！")
    ;
    private int Code;
    private String Description;
    ResponseTypeEnum(int Code,String Description){
        this.Code=Code;
        this.Description=Description;
    }
    public String getDescription(){
        return Description;
    }
    public int getCode(){
        return Code;
    }


}
